<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/7/26 0026
 * Time: 9:05
 */
namespace  app\api\controller\v1;
use app\api\model\PrizeModel;
use think\Request;

class Prize
{
    /**奖品列表接口
     * @param Request $request
     * @return \think\response\Json
     */
    public function product(Request $request){
        //获取奖品列表
        $bool = PrizeModel::getPrize($request);
        return json($bool);
    }

    /**领奖接口
     * @param Request $request
     * @return \think\response\Json
     */
    public function exchange(Request $request){
        $bool = PrizeModel::getPrizeInfo($request);
        return json($bool);
    }

    /**获取奖品简略信息
     * @param Request $request
     * @return \think\response\Json
     */
    public function product_info(Request $request){
        $arr = PrizeModel::product_info($request);
        return json($arr);
    }

    /**查询获奖记录
     * @param Request $request
     * @return \think\response\Json
     */
    public function prize_info(Request $request){
        $str = PrizeModel::prize_info($request);
        return json($str);
    }
}